Integrand size = 45, antiderivative size = 290 \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n}}{f g (6+m-n)}+\frac {3 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-2+n}}{c f g (4+m-n) (6+m-n)}+\frac {6 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{c^2 f g (2+m-n) (4+m-n) (6+m-n)}+\frac {6 (g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{c^3 f g (m-n) (2+m-n) (4+m-n) (6+m-n)} \]
(g*cos(f*x+e))^(-n-m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-3+n)/f/g/(6+m- n)+3*(g*cos(f*x+e))^(-n-m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-2+n)/c/f/ g/(4+m-n)/(6+m-n)+6*(g*cos(f*x+e))^(-n-m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+ e))^(-1+n)/c^2/f/g/(2+m-n)/(4+m-n)/(6+m-n)+6*(g*cos(f*x+e))^(-n-m)*(a+a*si n(f*x+e))^m*(c-c*sin(f*x+e))^n/c^3/f/g/(m-n)/(2+m-n)/(4+m-n)/(6+m-n)
Time = 21.86 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.67 \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\frac {(g \cos (e+f x))^{-m-n} (a (1+\sin (e+f x)))^m (c-c \sin (e+f x))^n \left (-30-46 m-18 m^2-2 m^3+46 n+36 m n+6 m^2 n-18 n^2-6 m n^2+2 n^3+6 (3+m-n) \cos (2 (e+f x))+3 \left (15+2 m^2-4 m (-3+n)-12 n+2 n^2\right ) \sin (e+f x)-3 \sin (3 (e+f x))\right )}{2 c^3 f g (m-n) (2+m-n) (4+m-n) (6+m-n) (-1+\sin (e+f x))^3} \]
Integrate[(g*Cos[e + f*x])^(-1 - m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[ e + f*x])^(-3 + n),x]
((g*Cos[e + f*x])^(-m - n)*(a*(1 + Sin[e + f*x]))^m*(c - c*Sin[e + f*x])^n *(-30 - 46*m - 18*m^2 - 2*m^3 + 46*n + 36*m*n + 6*m^2*n - 18*n^2 - 6*m*n^2 + 2*n^3 + 6*(3 + m - n)*Cos[2*(e + f*x)] + 3*(15 + 2*m^2 - 4*m*(-3 + n) - 12*n + 2*n^2)*Sin[e + f*x] - 3*Sin[3*(e + f*x)]))/(2*c^3*f*g*(m - n)*(2 + m - n)*(4 + m - n)*(6 + m - n)*(-1 + Sin[e + f*x])^3)
Time = 1.44 (sec) , antiderivative size = 269, normalized size of antiderivative = 0.93, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {3042, 3328, 3042, 3328, 3042, 3328, 3042, 3327}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n-1} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n-1}dx\) |
\(\Big \downarrow \) 3328 |
\(\displaystyle \frac {3 \int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^{n-2}dx}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^{n-2}dx}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3328 |
\(\displaystyle \frac {3 \left (\frac {2 \int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^{n-1}dx}{c (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}\right )}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \left (\frac {2 \int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^{n-1}dx}{c (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}\right )}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3328 |
\(\displaystyle \frac {3 \left (\frac {2 \left (\frac {\int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^ndx}{c (m-n+2)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}\right )}{c (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}\right )}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {3 \left (\frac {2 \left (\frac {\int (g \cos (e+f x))^{-m-n-1} (\sin (e+f x) a+a)^m (c-c \sin (e+f x))^ndx}{c (m-n+2)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}\right )}{c (m-n+4)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}\right )}{c (m-n+6)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}\) |
\(\Big \downarrow \) 3327 |
\(\displaystyle \frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-3} (g \cos (e+f x))^{-m-n}}{f g (m-n+6)}+\frac {3 \left (\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-2} (g \cos (e+f x))^{-m-n}}{f g (m-n+4)}+\frac {2 \left (\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c f g (m-n) (m-n+2)}\right )}{c (m-n+4)}\right )}{c (m-n+6)}\) |
((g*Cos[e + f*x])^(-m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-3 + n))/(f*g*(6 + m - n)) + (3*(((g*Cos[e + f*x])^(-m - n)*(a + a*Sin[e + f *x])^m*(c - c*Sin[e + f*x])^(-2 + n))/(f*g*(4 + m - n)) + (2*(((g*Cos[e + f*x])^(-m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-1 + n))/(f*g* (2 + m - n)) + ((g*Cos[e + f*x])^(-m - n)*(a + a*Sin[e + f*x])^m*(c - c*Si n[e + f*x])^n)/(c*f*g*(m - n)*(2 + m - n))))/(c*(4 + m - n))))/(c*(6 + m - n))
3.2.88.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b* (g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/(a* f*g*(m - n))), x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[m + n + p + 1, 0] && NeQ[m, n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b* (g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/(a* f*g*(2*m + p + 1))), x] + Simp[(m + n + p + 1)/(a*(2*m + p + 1)) Int[(g*C os[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && ILtQ[Simplify[m + n + p + 1], 0] && NeQ[2*m + p + 1, 0] && (S umSimplerQ[m, 1] || !SumSimplerQ[n, 1])
\[\int \left (g \cos \left (f x +e \right )\right )^{-1-m -n} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{-3+n}d x\]
Time = 0.39 (sec) , antiderivative size = 264, normalized size of antiderivative = 0.91 \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=-\frac {{\left (6 \, {\left (m - n + 3\right )} \cos \left (f x + e\right )^{3} - {\left (m^{3} + 3 \, {\left (m + 3\right )} n^{2} - n^{3} + 9 \, m^{2} - {\left (3 \, m^{2} + 18 \, m + 26\right )} n + 26 \, m + 24\right )} \cos \left (f x + e\right ) - 3 \, {\left (2 \, \cos \left (f x + e\right )^{3} - {\left (m^{2} - 2 \, {\left (m + 3\right )} n + n^{2} + 6 \, m + 8\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} e^{\left (2 \, {\left (n - 3\right )} \log \left (g \cos \left (f x + e\right )\right ) - {\left (n - 3\right )} \log \left (a \sin \left (f x + e\right ) + a\right ) + {\left (n - 3\right )} \log \left (\frac {a c}{g^{2}}\right )\right )}}{f m^{4} + f n^{4} + 12 \, f m^{3} - 4 \, {\left (f m + 3 \, f\right )} n^{3} + 44 \, f m^{2} + 2 \, {\left (3 \, f m^{2} + 18 \, f m + 22 \, f\right )} n^{2} + 48 \, f m - 4 \, {\left (f m^{3} + 9 \, f m^{2} + 22 \, f m + 12 \, f\right )} n} \]
integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-3+ n),x, algorithm="fricas")
-(6*(m - n + 3)*cos(f*x + e)^3 - (m^3 + 3*(m + 3)*n^2 - n^3 + 9*m^2 - (3*m ^2 + 18*m + 26)*n + 26*m + 24)*cos(f*x + e) - 3*(2*cos(f*x + e)^3 - (m^2 - 2*(m + 3)*n + n^2 + 6*m + 8)*cos(f*x + e))*sin(f*x + e))*(g*cos(f*x + e)) ^(-m - n - 1)*(a*sin(f*x + e) + a)^m*e^(2*(n - 3)*log(g*cos(f*x + e)) - (n - 3)*log(a*sin(f*x + e) + a) + (n - 3)*log(a*c/g^2))/(f*m^4 + f*n^4 + 12* f*m^3 - 4*(f*m + 3*f)*n^3 + 44*f*m^2 + 2*(3*f*m^2 + 18*f*m + 22*f)*n^2 + 4 8*f*m - 4*(f*m^3 + 9*f*m^2 + 22*f*m + 12*f)*n)
Timed out. \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\text {Timed out} \]
Exception generated. \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\text {Exception raised: RuntimeError} \]
integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-3+ n),x, algorithm="maxima")
\[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\int { \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n - 3} \,d x } \]
integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-3+ n),x, algorithm="giac")
integrate((g*cos(f*x + e))^(-m - n - 1)*(a*sin(f*x + e) + a)^m*(-c*sin(f*x + e) + c)^(n - 3), x)
Time = 19.78 (sec) , antiderivative size = 1623, normalized size of antiderivative = 5.60 \[ \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-3+n} \, dx=\text {Too large to display} \]
-exp(- e*4i - f*x*4i)*(c - c*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f* x*1i)*1i)/2))^(n - 3)*((3*(a + a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2))^m)/(8*f*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/ 2))^(m + n + 1)*(m*48i - n*48i - m*n*88i + m*n^2*36i - m^2*n*36i - m*n^3*4 i - m^3*n*4i + m^2*44i + m^3*12i + m^4*1i + n^2*44i - n^3*12i + n^4*1i + m ^2*n^2*6i)) - (3*exp(e*8i + f*x*8i)*(a + a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2))^m)/(8*f*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(m + n + 1)*(m*48i - n*48i - m*n*88i + m*n^2*36i - m^2*n*36i - m*n^3*4i - m^3*n*4i + m^2*44i + m^3*12i + m^4*1i + n^2*44i - n^3*12i + n^4*1i + m^2*n^2*6i)) - (exp(e*2i + f*x*2i)*(a + a*((exp(- e*1i - f*x*1i)* 1i)/2 - (exp(e*1i + f*x*1i)*1i)/2))^m*(36*m - 36*n - 12*m*n + 6*m^2 + 6*n^ 2 + 42))/(8*f*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(m + n + 1)*(m*48i - n*48i - m*n*88i + m*n^2*36i - m^2*n*36i - m*n^3*4i - m^3*n*4i + m^2*44i + m^3*12i + m^4*1i + n^2*44i - n^3*12i + n^4*1i + m^2*n^2*6i)) + (exp(e*6i + f*x*6i)*(a + a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f* x*1i)*1i)/2))^m*(36*m - 36*n - 12*m*n + 6*m^2 + 6*n^2 + 42))/(8*f*(g*(exp( - e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(m + n + 1)*(m*48i - n*48i - m *n*88i + m*n^2*36i - m^2*n*36i - m*n^3*4i - m^3*n*4i + m^2*44i + m^3*12i + m^4*1i + n^2*44i - n^3*12i + n^4*1i + m^2*n^2*6i)) + (exp(e*1i + f*x*1i)* (a + a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2))^m*(m*...